import java.util.Scanner;

public class demo04 {
    //卡片
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int i=1;
        while (true){
            int num=i;
            int tmp=num*(num+1)/2;
            if(tmp>=n){
                System.out.println(num);
                return;
            }
            i++;
        }
    }
}
